package com.zhuss.bean.unit.team;

import com.zhuss.enums.EnumUtil;
import com.zhuss.enums.QuestionType;
import com.zhuss.util.JsonUtil;

import java.util.Date;
import java.util.List;

/**
 * @Author: zhushanshuo
 * @Date: 2020/4/7 13:24
 */
public class QuestionBean {

    private Long questionId;

    private String questionName;

    private String questionChoose;

    private Integer type;

    private String typeName;

    private Integer area;

    private String answer;

    public Long getQuestionId() {
        return questionId;
    }

    public void setQuestionId(Long questionId) {
        this.questionId = questionId;
    }

    public String getQuestionName() {
        return questionName;
    }

    public void setQuestionName(String questionName) {
        this.questionName = questionName;
    }

    public List<ChooseBean> getQuestionChoose() {
        List<ChooseBean> result = JsonUtil.fromJsonList(questionChoose, ChooseBean.class);
        return result;
    }

    public void setQuestionChoose(String questionChoose) {
        this.questionChoose = questionChoose;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getArea() {
        return area;
    }

    public void setArea(Integer area) {
        this.area = area;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public String getTypeName() {
        return EnumUtil.containsKey(QuestionType.class, type);
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
}
